package com.yjhealth.app.arouter;

import android.content.Context;

import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.annotation.Interceptor;
import com.alibaba.android.arouter.facade.callback.InterceptorCallback;
import com.alibaba.android.arouter.facade.template.IInterceptor;
import com.yjhealth.libs.commonlib.arouter.interceptor.CommonTInterceptor;


@Interceptor(priority = 1)
public class ArouterInterceptor implements IInterceptor {
    private CommonTInterceptor interceptor;

    /**
     * The operation of this tollgate.
     *
     * @param postcard meta
     * @param callback cb
     */
    @Override
    public void process(Postcard postcard, InterceptorCallback callback) {
        interceptor.process(postcard, callback);
    }

    /**
     * Do your init work in this method, it well be call when processor has been load.
     *
     * @param context ctx
     */
    @Override
    public void init(Context context) {
        interceptor = new CommonTInterceptor();
        interceptor.init(context);
    }
}

